package com.myfoon.servlet.apps;

import java.io.IOException;

import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Maps extends HttpServlet {
    public Maps() {
    }


    @Override
    protected void doGet(HttpServletRequest httpServletRequest,
                         HttpServletResponse httpServletResponse) throws ServletException,
                                                                         IOException {
        PrintWriter writer = httpServletResponse.getWriter();
        httpServletResponse.setContentType("text/html; charset=UTF-8");
        httpServletResponse.setHeader("Cache-Control", "no-cache");

        writer.print("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">");
        writer.print("<html>");
        writer.print("<head>");
        writer.print("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\"></meta>");
        writer.print("<title>MapsTest</title>");
        writer.print("<script type=\"text/javascript\">");
        writer.print("var mapInitialized=false;");
        writer.print("var gmap;");
        writer.print("var mgr;");
        writer.print("var icons={};");
        writer.print("var allmarkers=[];");
        writer.print("</script>");
        writer.print("<script type=\"text/javascript\" src=\"/js/json2.js\"></script>");
        writer.print("<script type=\"text/javascript\" src=\"/js/maps.js\"></script>");
        writer.print("<link rel=\"stylesheet\" type=\"text/css\" href=\"/style/maps.css\"/>");
        writer.print("</head>");
        writer.print("<body onload=\"initializeMap();\"onunload=\"GUnload();\">");
        writer.print("<div style=\"width:590px;\">");
        writer.print("<span style=\"color:#02243C;font-weight=bold;font-size:18px;font-family:Tahoma;\">Mark your Location on the map</span>");
        writer.print("<div style=\"margin-top: 10px;margin-bottom:10px;float:left;border-top:Solid 1px #B9D5EB;border-bottom:Solid 1px #B9D5EB;width:590px;");
        writer.print("padding: 0px 0px 10px 0px;\">");
        writer.print("<div style=\"margin-bottom:7px;padding-left:5px;padding-bottom:3px;padding-top:1px;background:#F0F7F9\">");
        writer.print("<span style=\"font-size: 12px;color:#000000;text-decoration:underline;");
        writer.print("font-weight:bold;font-family:Tahoma\">Search</span>");
        writer.print("<span style=\"font-size:12px;color:#D9D9D9;font-family:Tahoma\">|</span>");
        writer.print("<span style=\"font-size:11px;font-family:Tahoma\">My Favorites</span>");
        writer.print("<span style=\"font-size:12px;color:#D9D9D9;font-family:Tahoma\">|</span>");
        writer.print("<span style=\"font-size:11px;font-family:Tahoma\">Where Friends are</span>");
        writer.print("<span style=\"font-size:12px;color:#D9D9D9;font-family:Tahoma\">|</span>");
        writer.print("<span style=\"font-size:11px;font-family:Tahoma\">Most visited</span>");
        writer.print("</div>");
        writer.print("<div style=\"float:left;width:240px;\">");
        writer.print("<div style=\"height:20px;\">");
        writer.print("<input id=\"loc_search\" type=\"text\"");
        writer.print("onkeyup=\"keyEvent(event, this); return false;\"");
        writer.print("style=\"border:Solid 1px #D1D1D1;width:225px; ");
        writer.print("font-family:Tahoma;font-size:12px;\"/>");
        writer.print("</div>");
        writer.print("<div id =\"search_results\" class=\"search_results\">");
        writer.print("</div>");
        writer.print("</div>");
        writer.print("<div id=\"map_div\" style=\"float:right;border:Solid 1px #D1D1D1;");
        writer.print("background: #FCFCFC;width:325px;height:275px;\">");
        writer.print("</div>");
        writer.print("</div>");
        writer.print("<div style=\"clear:both\"/>");
        writer.print("<button>OK</button>");
        writer.print("<button onclick='parent.document.getElementById(\"modalPage\").style.display=\"none\";'>Cancel</button>");
        writer.print("</div>");
        writer.print("</body>");
        writer.print("</html>");
    }
}
